<%--
  Created by IntelliJ IDEA.
  User: haol
  Date: 2016/9/23
  Time: 23:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/meta.jsp" %>
    <link rel="stylesheet" type="text/css" href="${ctx}/js/lib/validate/validate.css">
    <script type="text/javascript" src="${ctx}/js/lib/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/lib/validate/jquery.validate.common_rules.js"></script>
    <script type="text/javascript" src="${ctx}/js/lib/validate/messages_cn.js"></script>
    <script type="text/javascript" src="${ctx}/js/gcu/owner/edit.js"></script>
</head>
<body>
<div>
    <ul class="breadcrumb">
        <li class="icon"></li>
        <li>您所在的位置：</li>
        <li>系统管理</li>
        <li>业主管理</li>
        <li>业主${empty id ? "新增" : "修改"}</li>
    </ul>
    <%@ include file="/common/top.jsp" %>
    <div class="widget widget-table">
        <div class="widget-content" id="formDiv">
            <form>
                <input type="hidden" name="id" value="${id}"/>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/template" id="ownerTmp">
    <div class="widget-content" id="_editDiv">
        <table class="pn-ftable table-bordered" border="0" cellpadding="10">
            <tbody class="_edit">
            <tr>
                <th colspan="2" style="text-align:center;">业主信息：</th>
                <input type="hidden" name="id" value="${owner.id}">
            </tr>
            <tr>
                <th><span class="point">*</span>业主姓名：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="ownerName" maxlength="50" class="form-control" value="<@=owner.ownerName@>"
                           onblur="this.value=$.trim(this.value);"/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>性别：</th>
                <td class="pn-fcontent form-inline">
                    <@
                         if(owner.id != null ) {
                    @>
                    <select name="sex"  class="form-control">
                        <option value="0" <@ if(owner.sex==0){@>selected="selected"<@}@>>女</option>
                        <option value="1" <@ if(owner.sex==1){@>selected="selected"<@}@>>男</option>
                    </select>
                    <@
                    }else{
                    @>
                    <select name="sex"  class="form-control">
                        <option value="1">男</option>
                        <option value="0">女</option>
                    </select>
                    <@
                    }
                    @>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>电话：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="phone" maxlength="50" class="form-control" value="<@=owner.phone@>"/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>工作地址：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="unitAdd" maxlength="50" class="form-control" value="<@=owner.unitAdd@>"/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>楼宇信息：</th>
                <td class="pn-fcontent form-inline">
                    <@if(owner.id != null){@>
                    <input type="text" name="buildName" maxlength="50" class="form-control" value="<@=owner.buildName@>"/>
                    <@}else{@>
                    <select name="buildName" class="form-control">
                        <option value="">请选择</option>
                        <c:forEach var="builds" items="${build_list}" >
                            <option value="${builds.buildName}">${builds.buildName}</option>
                        </c:forEach>
                    </select>
                    <@}@>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>门户号：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="roomNum" maxlength="50" class="form-control" value="<@=owner.roomNum@>"/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>创建时间：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="createTime" maxlength="50" class="form-control" value="<@=owner.createTime@>"disabled/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>家庭人数：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="homeNum" maxlength="50" class="form-control" value="<@=owner.homeNum@>"/>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>物业费：</th>
                <td class="pn-fcontent form-inline">
                <select name="isMoney"  class="form-control"disabled>
                    <option value="0" <@ if(owner.sex==0){@>selected="selected"<@}@>>未交</option>
                    <option value="1" <@ if(owner.sex==1){@>selected="selected"<@}@>>已交</option>
                </select>
                </td>
            </tr>
            <tr>
                <td class="pn-fcontent text-center" colspan="2">
                    <button type="button" class="btn btn-info" id="saveBtn">保存</button>
                    <button type="button" class="btn btn-default" id="backBtn">返回</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</script>